<div style="padding: 0 60px 0 60px; height: 300px;"><br>
<?php
	if(!empty($_GET["id"]))
	{
		$_SESSION['idt'] = $_GET['id'];
	}
	
    $conection = mysql_connect($mysql_host,$mysql_user,$mysql_password);
    mysql_set_charset('utf8',$conection);
    @mysql_select_db($mysql_database) or die("Nie udalo sie wybrac bazy danych");
  
	include('pic_add_serv.php');

?>
</div>
<div style="padding: 0 50px 0 50px; text-align: center;">
<table>
    <?php
		$n = 0;
		$query = "SELECT * FROM `GALERIA` WHERE `GROUP` = ".$_SESSION['idt'].";";
		$result = mysql_query($query);
		while($row = mysql_fetch_assoc($result))
		{
			if($n==0)
			{
				echo "<tr>";
			}
		    echo "<td><a href='/?content=imgal&id=".$row['ID']."'><img src=\"".$row['LINK_M']."\" alt=\"\"></a></td>";
			if($n==3)
			{
				echo "</tr>";
				$n = 0;
			}
			$n++;
		}
		mysql_close();
	?>
</table>
</div>
